<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~masterurl/custom.master"
  Inherits="Kiiro.SiteDefinition.PortalPages.NewUser, Kiiro.SiteDefinition, Version=1.2.0.7, Culture=neutral, PublicKeyToken=5b2f4277f61b7816" 
  MaintainScrollPositionOnPostback="true" %>

<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register TagPrefix="SharePoint" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
  Namespace="Microsoft.SharePoint.WebControls" %>
<%@ Register TagPrefix="v2" TagName="CustomFieldCollection" Src="~/_controltemplates/Kiiro/CustomFieldCollection.ascx" %>
<%@ Register TagPrefix="v2" TagName="AttachmentControl" Src="~/_controltemplates/Kiiro/AttachmentControl.ascx" %>
<%@ Register TagPrefix="v2" TagName="FormButtons" Src="~/_controltemplates/Kiiro/FormButtons.ascx" %>
<asp:Content ID="ContentTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
  <asp:Literal ID="litTitle" runat="server" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

  <script type="text/javascript">
    $(InitProfilePicture);
    $(EnableAuthenticationPanels);
    $(DetermineIfManageProjects);
    $(InitLookupADUserInformation);
  </script>

  <div class="body-pad">
    <div class="body">
      <div class="wrap">
        <div class="panel-pad">
          <div class="panel">
            <div class="panel-wrap">
              <div class="panel-title">
                <h2>User Settings</h2>
              </div>
              <div class="panel-content">
                <div class="settings">
                  <div class="row" id="Authentication" runat="server">
                    <dl>
                      <dt>Authentication Type</dt>
                      <dd>
                        <asp:RadioButtonList ID="rbAuthentication" runat="server" CssClass="radio" RepeatDirection="Horizontal"
                          RepeatLayout="Flow">
                          <asp:ListItem Value="AD">Active Directory</asp:ListItem>
                          <asp:ListItem Value="Forms">Forms</asp:ListItem>
                        </asp:RadioButtonList>
                      </dd>
                    </dl>
                    <dl>
                      <dt><h3>Choose an authentication type</h3></dt>
                      <dd>Choose active directory to add a user on your network or choose forms to add a external user</dd>
                    </dl>
                  </div>
                  <asp:Panel ID="pnlAD" runat="server">
                    <div class="row">
                      <dl>
                        <dt>Active Directory (AD) Login <span class="required">*</span></dt>
                        <dd><asp:TextBox ID="txtADLogin" runat="server" class="input jq_UserLogin" /></dd>
                        <dd id="jq_LoadingADLookup"><img alt="Loading..." src="/_layouts/images/Kiiro/ajaxProgress.gif" /></dd>
                        <dd><asp:Label ID="lblADLoginMessage" runat="server" CssClass="validation-message jq_ADLoginMessage" /></dd>
                      </dl>
                      <dl>
                        <dt><h3>AD Login Name</h3></dt>
                        <dd>An AD user's login name.</dd>
                      </dl>
                    </div>
                  </asp:Panel>
                  <asp:Panel ID="pnlForms" runat="server">
                    <div class="row">
                      <dl>
                        <dt>Login <span class="required">*</span></dt>
                        <dd><asp:TextBox ID="txtLogin" runat="server" class="input" /></dd>
                        <dd><asp:Label ID="lblLoginMessage" runat="server" CssClass="validation-message" /></dd>
                      </dl>
                      <dl>
                        <dt><h3>User's login name</h3></dt>
                        <dd>Enter a login name for the user.</dd>
                      </dl>
                    </div>
                    <div class="row">
                      <dl>
                        <dt>Password <span class="required">*</span></dt>
                        <dd><asp:TextBox ID="txtPassword" TextMode="Password" runat="server" class="input" /></dd>
                        <dd><asp:Label ID="lblPasswordMessage" runat="server" CssClass="validation-message" /></dd>
                      </dl>
                      <dl>
                        <dt><h3>User's password</h3></dt>
                        <dd>Enter the initial password for the user.</dd>
                      </dl>
                    </div>
                    <div class="row">
                      <dl>
                        <dt>Confirm Password <span class="required">*</span></dt>
                        <dd><asp:TextBox ID="txtConfirmPassword" TextMode="Password" runat="server" class="input" /></dd>
                        <dd><asp:Label ID="lblConfirmPasswordMessage" runat="server" CssClass="validation-message" /></dd>
                      </dl>
                      <dl>
                        <dt><h3>Password Confirmation</h3></dt>
                        <dd>This value must match the value entered in the password field.</dd>
                      </dl>
                    </div>
                  </asp:Panel>
                  <asp:Panel ID="pnlUserOnly" runat="server">
                  <div class="row">
                    <dl>
                      <dt>First name</dt>
                      <dd><asp:TextBox ID="txtFirstName" runat="server" class="input jq_FirstName" /></dd>
                      <dd><asp:Label ID="lblFirstNameMessage" runat="server" CssClass="validation-message" /></dd>
                    </dl>
                    <dl>
                      <dt><h3>User's first name.</h3></dt>
                      <dd>First name. Maximum length of 100 characters.</dd>
                    </dl>
                  </div>
                  <div class="row">
                    <dl>
                      <dt>Last name <span class="required">*</span></dt>
                      <dd><asp:TextBox ID="txtLastName" runat="server" class="input jq_LastName" /></dd>
                      <dd><asp:Label ID="lblLastNameMessage" runat="server" CssClass="validation-message" /></dd>
                    </dl>
                    <dl>
                      <dt><h3>User's last name.</h3></dt>
                      <dd>Last name. Maximum length of 100 characters.</dd>
                    </dl>
                  </div>
                  <div class="row">
                    <dl>
                      <dt>Email <span class="required">*</span></dt>
                      <dd><asp:TextBox ID="txtEmail" runat="server" class="input jq_Email" /></dd>
                      <dd><asp:Label ID="lblEmailMessage" runat="server" CssClass="validation-message" /></dd>
                    </dl>
                    <dl>
                      <dt><h3>Enter the user's email address</h3></dt>
                      <dd>Maximum length of 100 characters. Email address will be available to other users to see.</dd>
                    </dl>
                  </div>
                  <div class="row">
                    <dl>
                      <dt>Phone number</dt>
                      <dd><asp:TextBox ID="txtPhoneNumber" runat="server" class="input jq_PhoneNumber" /></dd>
                      <dd><asp:Label ID="lblPhoneNumberMessage" runat="server" CssClass="validation-message" /></dd>
                    </dl>
                    <dl>
                      <dt><h3>Enter user's phone number.</h3></dt>
                      <dd>Phone number will be available to users to see.</dd>
                    </dl>
                  </div>
                  <div class="row">
                    <dl>
                      <dt>Company Name</dt>
                      <dd><asp:TextBox ID="txtCompanyName" runat="server" class="input jq_Company" /></dd>
                      <dd><asp:Label ID="lblCompanyNameMessage" runat="server" CssClass="validation-message" /></dd>
                    </dl>
                    <dl>
                      <dt><h3>Enter company name.</h3></dt>
                      <dd>Name of company the user belongs to.</dd>
                    </dl>
                  </div>
                  <div class="row">
                    <dl>
                      <dt>Title</dt>
                      <dd><asp:TextBox ID="txtTitle" runat="server" class="input jq_Title" /></dd>
                      <dd><asp:Label ID="lblTitleMessage" runat="server" CssClass="validation-message" /></dd>
                    </dl>
                    <dl>
                      <dt><h3>Enter the user's job title</h3></dt>
                      <dd>What does this person do on this project? (eg. Designer, or Java Developer). Maximum length 100 characters.</dd>
                    </dl>
                  </div>
                  <div class="row">
                    <dl>
                      <dt>Instant messaging (IM) account</dt>
                      <dd><asp:TextBox ID="txtIM" runat="server" class="input" /></dd>
                      <dd><asp:Label ID="lblIMMessage" runat="server" CssClass="validation-message" /></dd>
                    </dl>
                    <dl>
                      <dt><h3>Enter the user's IM address.</h3></dt>
                      <dd>Maximum length of 100 characters. IM address will be available to other users to see.</dd>
                    </dl>
                  </div>
                  <div class="row">
                    <dl>
                      <dt>IM Client</dt>
                      <dd><asp:TextBox ID="txtIMClient" runat="server" class="input" /></dd>
                      <dd><asp:Label ID="lblIMClientMessage" runat="server" CssClass="validation-message" /></dd>
                    </dl>
                    <dl>
                      <dt><h3>Enter the user's IM Client.</h3></dt>
                      <dd>The client that the user's IM address is for. (Gtalk, AIM, MSN, Skype, iChat)</dd>
                    </dl>
                  </div>
                  <div class="row">
                    <v2:AttachmentControl id="attachments" runat="server" Title="Picture" />
                    <dl>
                      <dt><h3>Choose a picture for this user.</h3></dt>
                      <dd>
                        The selected picture will be shown on the user's profile, and in most locations
                        where this user is referenced or creates content.<br />
                        Must be either a .jpg or a .png.<br />
                        Suggested picture size is 144 x 144 pixels
                      </dd>
                    </dl>
                  </div>
                  <asp:Panel ID="pnlEmailNotifications" CssClass="row" runat="server">
                    <dl>
                      <dt>Receive email notification</dt>
                      <dd><asp:CheckBox ID="chkReceiveEmail" runat="server" CssClass="checkbox" /></dd>
                      <dd><asp:Label ID="lblReceiveEmailMessage" runat="server" CssClass="validation-message" /></dd>
                    </dl>
                    <dl>
                      <dt><h3>Receive system emails?</h3></dt>
                      <dd>Indicate if user should receive Kiiro system emails.</dd>
                    </dl>
                  </asp:Panel>
                  <div class="row">
                    <dl>
                      <dt>Add to all Projects</dt>
                      <dd><asp:CheckBox ID="chkAddToAllProjects" runat="server" CssClass="checkbox" /></dd>
                      <dd><asp:Label ID="lblAddToAllProjectsMessage" runat="server" CssClass="validation-message" /></dd>
                    </dl>
                    <dl>
                      <dt><h3>Add to all Projects?</h3></dt>
                      <dd>Indicate if user should be added to projects automatically whenever a project is created.</dd>
                    </dl>
                  </div>
                  </asp:Panel>
                  <div class="row">
                    <dl>
                      <dt>Is Administrator</dt>
                      <dd><asp:CheckBox ID="ckIsAdministrator" runat="server" CssClass="checkbox checkBoxAdmin" /></dd>
                      <dd><asp:Label ID="lblIsAdministratorMessage" runat="server" CssClass="validation-message" /></dd>
                    </dl>
                    <dl>
                      <dt><h3>Is Administrator?</h3></dt>
                      <dd>Indicate if user is an administrator. Administrators can manage projects and users as well as update Kiiro settings.</dd>
                    </dl>
                  </div>
                  <asp:Panel ID="pnlCanManageProjects" runat="server" CssClass="row borderless">
                    <dl>
                      <dt>Can Manage Projects</dt>
                      <dd><asp:CheckBox ID="ckManageProjects" runat="server" CssClass="checkbox checkBoxManageProjects" /></dd>
                      <dd><asp:Label ID="lblManageProjectsMessage" runat="server" CssClass="validation-message" /></dd>
                    </dl>
                    <dl>
                      <dt><h3>Can manage projects?</h3></dt> 
                      <dd>Indicate if user can manage projects. Unless the user is administrator they will only be able to manage projects and not be 
                      able to manage users or update Kiiro settings.</dd>
                    </dl>
                  </asp:Panel>
                </div>
              </div>
            </div>
          </div>
        </div>
        <v2:CustomFieldCollection id="v2CustomFieldCollection" runat="server" />
        <v2:FormButtons id="v2FormButtons" runat="server" />
      </div>
    </div>
  </div>
</asp:Content>
